<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>计算操作讲解</title>
    <style>
        body {
            font-family: 'Microsoft YaHei', Arial, sans-serif;
            margin: 0;
            padding: 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            min-height: 100vh;
        }
        .container {
            max-width: 800px;
            margin: 0 auto;
            background: white;
            border-radius: 15px;
            padding: 30px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
        }
        .title {
            text-align: center;
            color: #333;
            margin-bottom: 30px;
            font-size: 28px;
            font-weight: bold;
        }
        .explanation {
            font-size: 16px;
            line-height: 1.6;
            color: #555;
            margin-bottom: 20px;
            padding: 20px;
            background: #f8f9fa;
            border-radius: 10px;
            border-left: 5px solid #007bff;
        }
        .video-section {
            background: #f8f9fa;
            padding: 20px;
            border-radius: 10px;
            margin: 20px 0;
            border-left: 5px solid #28a745;
        }
        .video-title {
            font-size: 18px;
            font-weight: bold;
            color: #28a745;
            margin-bottom: 15px;
            display: flex;
            align-items: center;
            gap: 10px;
        }
        .video-container {
            position: relative;
            width: 100%;
            height: 0;
            padding-bottom: 56.25%; /* 16:9 比例 */
            background: #000;
            border-radius: 8px;
            overflow: hidden;
        }
        .video-container iframe {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            border: none;
        }
        .video-placeholder {
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #667eea, #764ba2);
            display: flex;
            align-items: center;
            justify-content: center;
            color: white;
            font-size: 18px;
            text-align: center;
            flex-direction: column;
            gap: 10px;
        }
        .video-placeholder .icon {
            font-size: 48px;
        }
    </style>
</head>
<body>
    <div class="container">
        <h1 class="title">计算操作讲解</h1>
        <div class="explanation">{{.ExplanationText}}</div>
        
        <div class="video-section">
            <div class="video-title">
                <span>🎥</span>
                <span>视频讲解</span>
            </div>
            <div class="video-container">
                {{if .VideoURL}}
                <iframe src="{{.VideoURL}}" allowfullscreen></iframe>
                {{else}}
                <div class="video-placeholder">
                    <div class="icon">📹</div>
                    <div>视频讲解即将上线</div>
                    <div style="font-size: 14px; opacity: 0.8;">后台将自动关联相关视频</div>
                </div>
                {{end}}
            </div>
        </div>
    </div>
</body>
</html>